package com.finger.userservice.controller.api;

import com.finger.modelservice.model.user.Patient;
import com.finger.userservice.service.PatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("site/patient")
public class PatientApiController {

    @Autowired
    private PatientService patientService;

    // 供订单模块内部使用 根据就诊人Id获取就诊人信息
    @GetMapping("inner/getPatient/{patientId}")
    public Patient getPatient(@PathVariable String patientId){
        return patientService.getById(patientId);
    }
}
